ti: k3: common: Program A53 arch timer frequency
authorNishanth Menon <[email protected]>
Fri, 14 Oct 2016 01:13:48 +0000 (01:13 +0000)
committerAndrew F. Davis <[email protected]>
Tue, 19 Jun 2018 17:42:37 +0000 (12:42 -0500)
Provide K3_TIMER_FREQUENCY for the platform configuration if the GTC
clock is selected statically and override option if the platform has a
different configuration.

Signed-off-by: Nishanth Menon <[email protected]>
Signed-off-by: Benjamin Fair <[email protected]>
plat/ti/k3/common/k3_bl31_setup.c
plat/ti/k3/include/platform_def.h

index 866f6e4203e506c64ecc5b15a58a66457a409f82..dea2802ebc6d2de91106f5512ddfc8e32c07adf1 100644 (file)
@@ -115,6 +115,11 @@ void platform_mem_init(void)
        /* Do nothing for now... */
 }
 
+unsigned int plat_get_syscnt_freq2(void)
+{
+       return SYS_COUNTER_FREQ_IN_TICKS;
+}
+
 /*
  * Empty function to prevent the console from being uninitialized after BL33 is
  * started and allow us to see messages from BL31.
index 7b38be57caf0b51915c598eb51f18fa6ba4f751c..a82bb362dac34bfead6a34c9d2b19b5d30fae802 100644 (file)
 #define CRASH_CONSOLE_CLK K3_USART_CLK_SPEED
 #define CRASH_CONSOLE_BAUD_RATE K3_USART_BAUD
 
+/* Timer frequency */
+#ifndef SYS_COUNTER_FREQ_IN_TICKS
+#define SYS_COUNTER_FREQ_IN_TICKS 200000000
+#endif
+
 #endif /* __PLATFORM_DEF_H__ */